import { FC } from "react";
import { Space, Typography} from "antd";
const {Title} = Typography
export type questionTitle_propsType = {
    title?:string,
    level?:1|2|3|4,
    iscenter?:boolean,

    onchange?:(newprops:questionTitle_propsType)=>void
    islock?:boolean
}

export const questionTitle_defaultValue:questionTitle_propsType = {
    title:'标题文字',
    level:4,
    iscenter:false
}

const QuestionTitle:FC<questionTitle_propsType> = (props)=>{
    const {title,iscenter,level} = {...questionTitle_defaultValue,...props}
    return <Space direction='vertical' style={{width:'100%'}}>
            <Title level={level} style={{textAlign:iscenter ? 'center' : 'start',margin:'0'}}>{title}</Title>
        </Space>

}

export default QuestionTitle